The Add method is used to add a Report Alert object to the report.
Function Add (Name As String, DefaultMessage As String, IsEnabled As Boolean, ConditionFormula As String, [MessageFormula as String]) As ReportAlert
In this example a report is grouped by country and contains a summary of last year's sales per country. The Report Alert will be triggered when the summary of last year's sales exceeds $25,000.00. When the Report Alert is triggered a message is created from the default message and the country name.
Dim name, defaultMessage, conditionFormula, messageFormula As String 'Name of the Report Alert name = "Sales Alert" defaultMessage = "Great sales in " 'Conditional formula used to evaluate the Report Alert conditionFormula = "Sum ({Customer.Last Year's Sales}, {Customer.Country}) > 25000" 'Replaces the default message set for the Report Alert. The message is 'created in a formula by concatenating the value set in the 'DefaultMessage parameter, and the group name of the country that 'triggers the Report Alert. 'DefaultAttribute is a function used by the Formula Editor to return 'the default message set for the Report Alert. messageFormula = "DefaultAttribute & GroupName ({Customer.Country})" Report.ReportAlerts.Add _ name, defaultMessage, True, conditionFormula, messageFormula
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |